package com.itheima.order.feign.callback;

import com.itheima.order.feign.OrderFein;
import com.itheima.order.pojo.Order;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

/**
 * 用来对orderfein接口进行降级处理
 */
@Component
public class OrderFeignCallBack implements OrderFein {
    @Override
    public List<Order> queryOrderByUserName(String userName) {
        List<Order>  list = new ArrayList<Order>();
        Order order = new Order();
        order.setId("0");
        order.setUsername("接口调用失败");
        list.add(order);
        return list;
    }
}
